home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_013 / sphere.abc < prev    next >
Text File  |  1992-05-06  |  2KB  |  47 lines

  1. 0     cmd 0:scnclr:end
  2. 10    '  ****  Spheres  ****
  3. 20    '  **  From ANALOG magazine  **
  4. 30    '  **  Translated from the Atari  **
  5. 40    '  **  by David Milligan, 70707,2521  11/2/85 **
  6. 50    '
  7. 60    '  ***  Draws multicoloured spheres of random
  8. 70    '  ***  sizes at random locations on the screen,
  9. 80    '  ***  endlessly, with a brief pause between
  10. 90    '  ***  spheres. Click left mouse button to exit.
  11. 100   '
  12. 110   ask window wid%,hi%:if wid%<600 then 130
  13. 120   screen 0,4,0
  14. 130   rgb 0,0,0,0:rgb 15,0,0,0
  15. 140   rgb 3,15,6,0:rgb 9,0,0,15
  16. 150   rgb 10,3,6,15:rgb 11,7,7,15
  17. 160   rgb 12,12,0,14:rgb 13,15,2,14
  18. 170   window #1,0,0,320,200,"Spheres"
  19. 180   cmd 1:graphic(1):scnclr
  20. 190   colr=2:randomize -1
  21. 200   size=90:cx=160:cy=96:time=1:deg=pi/180
  22. 210   pena colr
  23. 220   draw(cx+size,cy)
  24. 230   for y=90 to 0 step -6
  25. 240   colr=colr+1:if colr=15 then colr=2
  26. 250   pena colr
  27. 260   for x=0 to 360 step 10
  28. 270   if time=1 then goto 280 else goto 300
  29. 280   x2=cx+size*cos(x*deg):goto 290
  30. 290   y2=cy-(size*sin(x*deg)*sin(y*deg)):goto 310
  31. 300   x2=cx-(size*sin(x*deg)*sin(y*deg)):y2=cy+size*cos(x*deg)
  32. 310   draw(to x2,y2)
  33. 320   ask mouse x%,y%,b%:if b%<>0 then 450
  34. 330   next x:next y
  35. 340   time =time+1:if time=2 then draw(cx,cy+size):goto 230
  36. 350   size=20+rnd(1)*38:cx=size+1+(rnd(1)*(318-(size*2)))
  37. 360   cy=size+1+(rnd(1)*(190-(size*2)))
  38. 370   gosub 420:time=1:goto 220
  39. 380   pena 0 :for x=0 to 90 step 0.5
  40. 390   x2=size*cos(x*deg):y2=size*sin(x*deg)
  41. 400   draw(cx+x2,cy+y2 to cx-x2,cy+y2):draw(cx+x2,cy-y2 to cx-x2,cy-y2)
  42. 410   next x:pena colr:return
  43. 420   for i=0 to 500:ask mouse x%,y%,b%
  44. 430   if b%<>0 then 450
  45. 440   next i:goto 380
  46. 450   scnclr:close 1:rgb 0,6,9,15:rgb 15,11,11,11
  47.